package com.tengfei.blogsystem.dao;

import com.tengfei.blogsystem.pojo.RefreshToken;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * @version v1.0
 * @author} feige
 * @date 2021-10-18-16:23
 * @description
 */
public interface RefreshTokenDao extends JpaRepository<RefreshToken, String>, JpaSpecificationExecutor<RefreshToken> {

    RefreshToken findOneBytokenKey(String tokenKey);

    int deleteOneById(String id);

    // 删除通过用户id
    void deleteOneByuserId(String id);


    int deleteOneBytokenKey(String tokenKey);
}
